package com.thf.controller;


import com.thf.model.NavModels;
import com.thf.model.ResultData;
import com.thf.model.TopFootModels;
import com.thf.service.NavService;
import com.thf.service.TopFootService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.List;


@Controller
public class NavController {

    @Resource
    private NavService navService ;
    @Resource
    private TopFootService topFootService ;
    @RequestMapping("/index")
    public String findall(Model model){
        List<NavModels> navModels = navService.list();
        List<TopFootModels> topFootModels = topFootService.list();
        model.addAttribute("navData",navModels.get(0));
        model.addAttribute("topFootData",topFootModels);
        return "/index";
    }


}
